<?php /* Smarty version 2.6.19, created on 2012-12-22 16:56:49
         compiled from vietcad/shopping.tpl.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'number_format', 'vietcad/shopping.tpl.html', 41, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['usertemplate'])."/header.tpl.html", 'smarty_include_vars' => array('title' => 'header')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
    	<div class="content">
   			<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['usertemplate'])."/left.tpl.html", 'smarty_include_vars' => array('title' => 'left')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
        	<div class="cont_right">
           		<div class="main_content">
                	<h2>Giỏ hàng của bạn</h2>
                    <div class="details">
                         <?php echo '
						<script type="text/javascript" language="javascript">
							$(".capnhat a").click(function(){
								$("#frmBooking").submit();
							});
							$(\'.xoasp input[type=checkbox]\').click(function(){
								$("#frmBooking").submit();
							});

						</script>
                        '; ?>

                        <?php if ($this->_tpl_vars['cartItems']): ?>
                        <form name="frmBooking" id="frmBooking" action="" method="post">
                        <div class="giohang">
                            <div class="tt-ctgh">
                                <ul>
                                    <li class="tensp"><p>Tên sản phẩm</p></li>
                                    <li class="sluong"><p>Số lượng</p></li>
                                    <li class="gtien"><p>Giá tiền</p></li>
                                    <li class="ttien"><p>Tổng tiền</p></li>
                                    <li class="xoasp"><p>Xóa</p></li>
                                </ul>
                            </div><!--tt-ctgh-->
                            <div class="cc-ctgh">
                                
                                <?php $_from = $this->_tpl_vars['cartItems']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cartItem']):
?>
                                <div class="dong-chitiet">
                                    <ul>
                                        <li class="tensp"><p><?php echo $this->_tpl_vars['cartItem']->getProductName(); ?>
</p></li>
                                        <li class="sluong" style="text-align:center;">
                                            <input type="hidden" name="cIds[]" value="<?php echo $this->_tpl_vars['cartItem']->getId(); ?>
" />
                                            <input type="text" name="quantity[]" value="<?php echo $this->_tpl_vars['cartItem']->getQuantity(); ?>
" style="width:20px; height:20px; margin-top:10px;"/>
                                        </li>
                                        <li class="gtien"><span><?php echo ((is_array($_tmp=$this->_tpl_vars['cartItem']->getPrice())) ? $this->_run_mod_handler('number_format', true, $_tmp, 0, ",", ".") : number_format($_tmp, 0, ",", ".")); ?>
 <?php echo $this->_tpl_vars['messages']['currency']; ?>
</span></li>
                                        <li class="ttien">
                                        <?php $this->assign('price', $this->_tpl_vars['cartItem']->getPrice()); ?>
                                        <?php $this->assign('quantity', $this->_tpl_vars['cartItem']->getQuantity()); ?>
                                        <?php $this->assign('subTotal', $this->_tpl_vars['price']*$this->_tpl_vars['quantity']); ?>
                                        <?php $this->assign('grandTotal', $this->_tpl_vars['grandTotal']+$this->_tpl_vars['subTotal']); ?>
                                        <span><?php echo ((is_array($_tmp=$this->_tpl_vars['subTotal'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 0, ",", ".") : number_format($_tmp, 0, ",", ".")); ?>
 <?php echo $this->_tpl_vars['messages']['currency']; ?>
</span>
                                        </li>
                                        <li class="xoasp" style="text-align:center;">
                                            <input type="checkbox" name="dIds[]" value="<?php echo $this->_tpl_vars['cartItem']->getId(); ?>
" style="margin-top:10px;"/>
                                            <input type="hidden" name="op" value="shopping" />
                                            <input type="hidden" name="plus" value="updateCart" />
                                            <input type="hidden" name="lang" value="<?php echo $this->_tpl_vars['lang']; ?>
" />                    
                                        </li>
                                    </ul>
                                </div><!--dong-chitiet-->
                                <?php endforeach; endif; unset($_from); ?>
                                <div class="tongtientinh">
                                    <ul>
                                        <li class="tttt"><p>Tổng tiền cần thanh toán:</p></li>
                                        <li class="cccc"><span><?php echo ((is_array($_tmp=$this->_tpl_vars['grandTotal'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 0, ",", ".") : number_format($_tmp, 0, ",", ".")); ?>
 <?php echo $this->_tpl_vars['messages']['currency']; ?>
</span></li>
                                    </ul>
                                </div><!--tongtientinh-->
                                <div class="nutnut">
                                    <ul>
                                        <li class="capnhat"><a href="javascript:;"><img src="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/templates/<?php echo $this->_tpl_vars['usertemplate']; ?>
/images/nut-capnhat.jpg" /></a></li>                                    
                                        <li class="tieptuc">
                                            <?php if ($this->_tpl_vars['procatId']): ?>
                                            <?php $this->assign('procatSlug', $this->_tpl_vars['productcategories']->getProCate('slug',"id = ".($this->_tpl_vars['category']))); ?>
                                                <a href="<?php echo $this->_tpl_vars['url']->getLink('products',$this->_tpl_vars['lang'],$this->_tpl_vars['procatSlug'],$this->_tpl_vars['procatId']); ?>
" title="<?php echo $this->_tpl_vars['messages']['continue']; ?>
"><img src="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/templates/<?php echo $this->_tpl_vars['usertemplate']; ?>
/images/nut-tieptucmuahang.jpg" /></a>
                                            <?php else: ?>
                                                <a href="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/san-pham.html" title="<?php echo $this->_tpl_vars['messages']['continue']; ?>
"><img src="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/templates/<?php echo $this->_tpl_vars['usertemplate']; ?>
/images/nut-tieptucmuahang.jpg" /></a>
                                            <?php endif; ?>
                                        </li>
                                        <li class="thanhtoan"><a href="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/order.html"><img src="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/templates/<?php echo $this->_tpl_vars['usertemplate']; ?>
/images/nut-thanhtoan.jpg" /></a></li>
                                        <!--<li class="guidon"><a href="#"><img src="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/templates/<?php echo $this->_tpl_vars['usertemplate']; ?>
/images/nut-guidon.jpg" /></a></li>-->
                                    </ul>
                                </div><!--nutnut-->
                            </div><!--cc-ctgh-->
                        </div><!--giohang-->
                        </form>
                        <?php else: ?>
                        <div class="giohang" style="text-align:center; padding:10px 0px;">
                            Chưa có sản phẩm nào trong giỏ hàng của bạn. Click vào <a href="<?php echo $this->_tpl_vars['ROOTPATH']; ?>
/san-pham.html">đây</a> để tiếp tục mua hàng
                        </div>
                        <?php endif; ?>
                    </div>
                </div>
  			 </div>
   		</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['usertemplate'])."/footer.tpl.html", 'smarty_include_vars' => array('title' => 'footer')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 